package com.lsh.oms.core.common;

import com.lsh.atp.api.service.hold.IHoldDatailQueryRpcService;
import com.lsh.atp.api.service.hold.IHoldRpcService;
import com.lsh.atp.api.service.inventory.IInventoryRestoreRpcService;
import com.lsh.base.http.client.core.HttpClient;
import com.lsh.ofc.api.service.OrderService;
import com.lsh.ofc.api.service.ReturnRpcService;
import com.lsh.ofc.api.service.SoService;
import com.lsh.oms.api.service.es.EsAsyncInterface;
import com.lsh.oms.api.service.es.EsSyncInterface;
import com.lsh.oms.core.email.SendEmailService;
import com.lsh.oms.core.mq.MessageProducer;
import com.lsh.oms.core.proxy.service.GaoDeProxy;
import com.lsh.oms.core.proxy.service.GoodsServiceProxy;
import com.lsh.oms.core.proxy.service.PaymentProxy;
import com.lsh.oms.core.proxy.service.StrategyProxy;
import com.lsh.oms.core.redis.RedisTemplate;
import com.lsh.oms.core.service.asynservice.AsyncEventListener;
import com.lsh.oms.core.service.sms.ShortMessageService;
import com.lsh.oms.core.service.split.IOrderSplitService;
import org.springframework.context.annotation.Bean;
import org.springframework.mail.MailSender;

import static org.easymock.EasyMock.createMock;

public class MockBeans {

    @Bean
    public MailSender mailSender() {
        return createMock(MailSender.class);
    }

    @Bean
    public SendEmailService sendEmailService() {
        return createMock(SendEmailService.class);
    }

    @Bean
    public RedisTemplate redisTemplate() {
        return createMock(RedisTemplate.class);
    }

    @Bean
    public IInventoryRestoreRpcService inventoryRestoreRpcService() {
        return createMock(IInventoryRestoreRpcService.class);
    }

    @Bean
    public IHoldDatailQueryRpcService holdDatailQueryRpcService() {
        return createMock(IHoldDatailQueryRpcService.class);
    }

    @Bean
    public EsAsyncInterface esAsyncInterface() {
        return createMock(EsAsyncInterface.class);
    }

    @Bean
    public EsSyncInterface esSyncInterface() {
        return createMock(EsSyncInterface.class);
    }

    @Bean
    public GoodsServiceProxy goodsServiceProxy() {
        return createMock(GoodsServiceProxy.class);
    }

    @Bean
    public OrderService orderService() {
        return createMock(OrderService.class);
    }

    @Bean
    public ReturnRpcService returnRpcService() {
        return createMock(ReturnRpcService.class);
    }

    @Bean
    public AsyncEventListener asyncEventListener() {
        return createMock(AsyncEventListener.class);
    }

    @Bean
    public ShortMessageService shortMessageService() {
        return createMock(ShortMessageService.class);
    }

    @Bean
    public IHoldRpcService holdRpcService() {
        return createMock(IHoldRpcService.class);
    }

    @Bean
    public IOrderSplitService orderSplitService() {
        return createMock(IOrderSplitService.class);
    }

    @Bean
    public StrategyProxy strategyProxy() {
        return createMock(StrategyProxy.class);
    }

    @Bean
    public GaoDeProxy gaoDeProxy() {
        return createMock(GaoDeProxy.class);
    }

    @Bean
    public PaymentProxy paymentProxy() {
        return createMock(PaymentProxy.class);
    }

    @Bean
    public SoService soService() {
        return createMock(SoService.class);
    }

    @Bean(name = "kafka.message.producer")
    public MessageProducer messageProducer() {
        return createMock(MessageProducer.class);
    }

    @Bean(name = "apache.http.client")
    public HttpClient httpClient() {
        return createMock(HttpClient.class);
    }
}
